define(['aForm'], function (Form) {
    function ViewModel(params) {
        var scope = this;

        scope.labelDirection = 'right';
        scope.fields = [
            {name:'classifyCode',col:4,labelCol:3},
            {name:'year',col:4},
            {name:'departmentName',col:4},
            {name:'volumeNo',col:4,labelCol:3},
            {name:'storagePeriod',col:4},
            {name:'rank',col:4},
            {name:'classifyNo',col:4,labelCol:3},
            {name:'keyword',col:4},
            {name:'page',col:4},
            {name:'title',labelCol:1},
            {name:'title',labelCol:1},
            {name:'content',labelCol:1},
            {name:'person1',col:6,labelCol:2},
            {name:'person2',col:6},
            {name:'beginDate',col:6,labelCol:2},
            {name:'endDate',col:6},
            {name:'archivesFrom',col:6},
            {name:'archivesTo',col:6},
            {name:'archivesDate',col:6}
        ];
        scope.callParent(params);
    }

    ViewModel.extend(Form);

    ViewModel.prototype.isView = function (fieldName) {
        switch (this.operation) {
            case 'viewArchive':
            case 'archived':
            case 'unArchived':
                return true;
        }

        return this.record.isViewField(fieldName);
    }

    return ViewModel;
});
